package com.plan
/**
 * The ConstructionReport entity.
 *
 * @author  michael.geng  mokesoft
 *
 *
 */
class ConstructionReport {
    static mapping = {
         table 'pm_construction_report'
         // version is set to false, because this isn't available by default for legacy databases
         version true
         id generator:'identity', column:'ID'
         
    }
    Long id
    String sn
    String title
    String reportType
    Date startDate
    Date endDate
    String depart
    String creater
    String signLeader
    String signEngineer
    String signQc
    String signEngineDept
    String remark
    String str1
    String str2
    Date dateCreated
    Date lastUpdated
    Integer status
		
		static hasMany=[details:ConstructionReportDetail]
    static constraints = {
        sn(size: 0..30)
        title(size: 1..50, blank: false)
        reportType(size: 0..30)
        startDate()
        endDate()
        depart(size: 0..50)
        creater(size: 0..30)
        signLeader(size: 0..50)
        signEngineer(size: 0..50)
        signQc(size: 0..50)
        signEngineDept(size: 0..50)
        status(nullable: true, max: 2147483647)
        remark(size: 0..500)
        str1(nullable: true)
        str2(nullable: true)
        dateCreated()
        lastUpdated()
    }
    String toString() {
        return "${id}" 
    }
}
